<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import = "java.sql.ResultSet" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Role List</title>
<script>
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

function select_item()
{
	item = getCheckedValue(document.forms[0].elements['role']);
	targetitem.value = item;
	top.close();
	return false;
}
</script>

</head>
<body>
<form>
<table>
<%
	ResultSet result = (ResultSet)request.getAttribute("role");
	while(result.next()){
%>
	<tr><td><input type="radio" name="role" value="<%= result.getString(1) %>"><%= result.getString(1) %></td></tr>
<%
	}
%>
</table>
<input type="button" onclick="select_item()" value="close">
</form>
</body>
</html>